Reflection and Transmision - Eric Gallimore

Contents

Setup

function reflectionstuff()
close all;


theta = 0:0.01:pi/2;

c1 = 1500; %m/s
c2_hi = 1600; %m/s
c2_lo = 1450; %m/s

% only the ratio matters
rho1 = 1;
rho2 = 1.2;

[R_hi, T_hi, theta_crit] = r_and_t(theta, c1, c2_hi, rho1, rho2);
[R_lo, T_lo, ~] = r_and_t(theta, c1, c2_lo, rho1, rho2);

Plotting without attenuation

figure('name', 'Reflection Coefficient, no attenuation');
plot(theta, abs(R_hi));
hold on;
plot(theta, abs(R_lo), 'r--');
plot([theta_crit theta_crit], [0 1], 'c.--');
ylim([0 1.1]);
xlabel('Incident angle (radians)');
ylabel('Reflection Coefficient');
legend('c1=1500, c2=1600', 'c1=1500, c2=1450', ['Critical angle ' num2str(theta_crit)]);
title('Reflection Coefficients, no attenuation');


figure('name', 'Transmission Coefficient');
plot(theta, abs(T_hi));
hold on;
plot(theta, abs(T_lo), 'r--');
xlabel('Incident angle (radians)');
ylabel('Transmission Coefficient');
legend('c1=1500, c2=1600', 'c1=1500, c2=1450');
title('Transmission Coefficients')

Plotting with attenuation

% subtract 0.2 dB/lambda attenuation
a_lambda = 0.2;
sigma = a_lambda/54.58;
c_i = -1j*sigma*c1;
[R_at, ~, ~] = r_and_t(theta, (c1+c_i), c2_hi, rho1, rho2);

figure('name', 'Reflection Coefficient');
plot(theta, abs(R_hi));
hold on;
plot(theta, abs(R_at), 'r--');
ylim([0 1.1]);
xlabel('Incident angle (radians)');
ylabel('Reflection Coefficient');
legend('No attenuation', 'Attenuation');
title('Reflection coefficients with attenuation, c1=1500, c2=1600');

% subtract 0.2 dB/lambda attenuation
a_lambda = 0.2;
sigma = a_lambda/54.58;
c_i = -1j*sigma*c1;
[R_at_lo, ~, ~] = r_and_t(theta, (c1+c_i), c2_lo, rho1, rho2);

figure('name', 'Reflection Coefficient');
plot(theta, abs(R_lo));
hold on;
plot(theta, abs(R_at_lo), 'r--');
ylim([0 1.1]);
xlabel('Incident angle (radians)');
ylabel('Reflection Coefficient');
legend('No attenuation', 'Attenuation');
title('Reflection coefficients with attenuation, c1=1500, c2=1450');
end

Find R and T

function [R, T, theta_crit] = r_and_t(theta1, c1, c2, rho1, rho2)
    Z1 = imped(c1, rho1, theta1);

    theta2 = acos(c2/c1*cos(theta1));

    Z2 = imped(c2, rho2, theta2);

    R = (Z2-Z1)./(Z2+Z1);
    T = 2*Z2./(Z2 + Z1);

    if c2>c1
        theta_crit = acos(c1/c2);
    else
        theta_crit = NaN;
    end
end

function Z = imped(c, rho, theta)
    Z = rho*c./sin(theta);
end